- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Simplify jemalloc setup
          #146627
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
  
    Simplify jemalloc setup
  
  #146627
              
            Conversation
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
15a8fbc    to
    551e285      
    Compare
  
    | 
 Also, in the second commit, I fixed  | 
Simplify `jemalloc` setup try-job: `aarch64-gnu` try-job: `dist-aarch64-linux` try-job: `dist-x86_64-musl` try-job: `dist-x86_64-apple` try-job: `dist-aarch64-apple`
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| Some changes occurred in src/tools/clippy cc @rust-lang/clippy The Miri subtree was changed cc @rust-lang/miri These commits modify the  If this was unintentional then you should revert the changes before this PR is merged. | 
Using the new `override_allocator_on_supported_platforms` feature in `tikv-jemalloc-sys v0.6.1` we can avoid the manual statics.
de2de0b    to
    2c0d266      
    Compare
  
    
In the past,
#[used]had to appear in the top-level crate to have a consistent effect on the linker. This has been fixed a while ago for ELF with the introduction of thesymbols.ofile in #95604, and more recently for Mach-O in #133832, which means that libraries can now implement the required workarounds themselves. This allows moving these#[used]declarations out of ourmain.rs.Specifically, I have moved them into
tikv-jemalloc-syswhere they belong in tikv/jemallocator#109 and done the same formimallocin purpleprotocol/mimalloc_rust#146 (in case we want to experiment with switching to that one day).Test with:
try-job:
aarch64-gnutry-job:
dist-aarch64-linuxtry-job:
dist-x86_64-musltry-job:
dist-x86_64-appletry-job:
dist-aarch64-apple